import { Login, Home, Layout, My, Detail, NotFound } from '../views'
import { BrowserRouter as Router, Routes, Route, Navigate } from 'react-router-dom'
import React from 'react'

const Index: React.FC = () => {
	return (
		<Router>
			<Routes>
				<Route path='/' element={<Layout></Layout>}>
					<Route path="/home" element={<Home></Home>}></Route>
					<Route path='/my' element={<My></My>}></Route>
					<Route path="" element={<Navigate to="/home"></Navigate>}></Route>
				</Route>
				<Route path='/login' element={<Login></Login>}></Route>
				<Route path='/detail/:id/:name' element={<Detail></Detail>}></Route>
				<Route path='*' element={<NotFound></NotFound>}></Route>
			</Routes>
		</Router>
	)
}


export default Index